package panel.viewSpots.navigationNew
{
	import assists.HtmlText;
	import assists.TextFieldUtils;
	import assists.resource.ResourceLoader;
	
	import flash.display.Bitmap;
	import flash.display.Sprite;
	import flash.display.Stage;
	import flash.text.TextField;
	
	public class ItemLineBox extends Sprite
	{
		private var _label:TextField = new TextField();
		private var _line:Bitmap;
		private var _stage:Stage;
		private var _loader:ResourceLoader;
		public var data:Object;
		public function ItemLineBox(stage:Stage,loader:ResourceLoader)
		{
			_stage = stage;
			_loader = loader;
			init();
		}
		
		private function init():void
		{
			_label.mouseEnabled = false;
			_label.autoSize = "left";
			
			_line = new _loader.uiManager.cutLine();
			_line.width = _stage.stageWidth * 0.9;
			_line.y = 70;
			_line.x = (_stage.stageWidth - _line.width) * 0.5;
			
			this.addChild(_label);
			this.addChild(_line);
		}
		
		public function show(value:Object):void
		{
			
			data = value;
			TextFieldUtils.setHtmlText(_label,HtmlText.formatSizeColor(data.name,0,24));
			_label.x = (_stage.stageWidth - _label.width) * 0.5;
			_label.y = _line.y - _label.height;
		}
		
	}
}